import 'package:flutter/cupertino.dart';
import 'package:kkhousekeep/widget/kk_slive_header_delegate.dart';

class KKSliverPersistentHeader extends SliverPersistentHeader {
  double minHeight;
  double? maxHeight;
  Widget child;
  OnSliverHeaderChange? onSliverChange;

  KKSliverPersistentHeader({
    super.key,
    required this.minHeight,
    required this.child,
    this.maxHeight,
    this.onSliverChange,
  }) : super(
          delegate: KKCommonSliverHeaderDelegate(
            minHeight: minHeight,
            maxHeight: maxHeight,
            onSliverChange: onSliverChange,
            child: child,
          ),
        );

  KKSliverPersistentHeader.hover({
    super.key,
    required this.minHeight,
    required this.child,
    this.maxHeight,
    this.onSliverChange,
  }) : super(
          pinned: true,
          delegate: KKCommonSliverHeaderDelegate(
            minHeight: minHeight,
            maxHeight: maxHeight,
            onSliverChange: onSliverChange,
            child: child,
          ),
        );
}
